﻿<phone:PhoneApplicationPage 
    x:Class="WP7_Sample_Application.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True" xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" Loaded="PhoneApplicationPage_Loaded">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="WP7 Sample Application" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="ZXing on WP7" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Image Height="239" Stretch="Uniform"  HorizontalAlignment="Center" Margin="0,6,6,362" Name="imgCapture" VerticalAlignment="Center" Width="450" Source="/WP7_Sample_Application;component/Barcode.png" />
            <Button Content="Camera" Height="72" HorizontalAlignment="Left" Margin="87,323,0,0" Name="btnCamera" VerticalAlignment="Top" Width="160" Click="btnCamera_Click" />
            <Button Content="Sample" Height="72" HorizontalAlignment="Right" Margin="0,323,43,0" Name="btnSample" VerticalAlignment="Top" Width="160" Click="btnSample_Click" />
            <toolkit:ListPicker ItemCountThreshold="2" Margin="194,251,64,300" Name="lpBarcodeType" Height="56" ItemsSource="{Binding Source={StaticResource myBarcodeTypeManager}, Path=BarcodeTypes}" FullModeHeader="Select Barcode Type" CacheMode="BitmapCache" SelectionChanged="lpBarcodeType_SelectionChanged">
                <toolkit:ListPicker.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Path=Name}" Margin="0 -3 0 0"/>
                    </DataTemplate>
                </toolkit:ListPicker.ItemTemplate>
                <toolkit:ListPicker.FullModeItemTemplate>
                    <DataTemplate>
                        <Border BorderThickness="2" BorderBrush="{StaticResource PhoneForegroundBrush}" Margin="10,5,10,5" CornerRadius="5" Visibility="{Binding Path=Visible}">
                            <Border.Background>
                                <SolidColorBrush Color="{StaticResource PhoneForegroundColor}" Opacity=".20"/>
                            </Border.Background>
                            <Grid Width="430" Height="120">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="220" />
                                    <ColumnDefinition Width="*"  />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>

                                <Image Margin="10,10,10,10" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Source="{Binding Path=SampleImage}" />
                                <TextBlock Grid.Column="1" Margin="0,-7,0,0" VerticalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" TextWrapping="Wrap" FontSize="26"/>
                            </Grid>
                        </Border>
                    </DataTemplate>
                </toolkit:ListPicker.FullModeItemTemplate>
            </toolkit:ListPicker>



            <TextBlock Height="30" HorizontalAlignment="Left" Margin="52,266,0,0" Name="textBlock1" Text="Barcode Type" VerticalAlignment="Top" />
            <TextBlock Height="30" HorizontalAlignment="Left" Margin="12,401,0,0" Name="textBlock2" Text="Results:" VerticalAlignment="Top" />
            <TextBlock Height="164" HorizontalAlignment="Left" Margin="12,437,0,0" Name="txtResults" Text="" VerticalAlignment="Top" Width="438" Style="{StaticResource PhoneTextAccentStyle}" TextWrapping="Wrap" FontSize="24"/>
            <TextBlock Height="30" HorizontalAlignment="Left" Margin="31,345,0,0" Name="textBlock3" Text="Load:" VerticalAlignment="Top" />
        </Grid>
        <ProgressBar Name="pbStatus" Height="10" HorizontalAlignment="Left" Margin="12,142,0,0" VerticalAlignment="Top" Width="468" />
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>